﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IEx.Model.Partials.Media;

namespace IEx.Model.Partials
{
    public class Announcement
    {
        private long _Id = -1; // Default is new News
        public long Id
        {
            get { return _Id; }
            set { _Id = value; }
        }
        public long FailId { get; set; }
        public DateTime DateTime { get; set; }
        public long DateNumberic { get; set; }
        public string SourceCode { get; set; }
        public int LangId { get; set; }
        public string Message { get; set; }
        public string Title { get; set; }
        public DateTime InsertedDate { get; set; }
        public int SourceId { get; set; }
        public Nullable<int> MessageTypeId { get; set; }
        public List<Attachment> Attachments { get; set; }
        public bool Attachment { get; set; }
        public string PhysicalFileName { get; set; }
        public List<string> AttachmentLinks { get; set; }
        public string Link { get; set; }
        public string PressrelaseType { get; set; }
        public string PressrelaseCate { get; set; }
        private SocialNetwork _SocialNetwork;
        public SocialNetwork SocialNetwork
        {
            get
            {
                if (_SocialNetwork == null)
                    _SocialNetwork = new SocialNetwork();
                return _SocialNetwork;
            }
            set
            {
                _SocialNetwork = value;
            }
        }
        private bool _Updated = false;
        /// <summary>
        /// Specify this Message should be updated instead of add new.
        /// Don't change this Attribute's value unless it's necessary
        /// </summary>
        public bool Updated
        {
            get
            {
                return _Updated;
            }
            set
            {
                _Updated = value;
            }
        }
    }    

    public class SocialNetwork
    {
        public string SocialId { get; set; }
        public string AccountLink { get; set; }
        public string ScreenName { get; set; }
        private Profile _Profile;
        public Profile Profile
        {
            get
            {
                if (_Profile == null)
                    _Profile = new Profile();
                return _Profile;
            }
            set { _Profile = value; }
        }
        public List<Note> Notes { get; set; }
        public List<Groups> Groups { get; set; }
        public List<Friend> Friends { get; set; }
        public List<Comment> Comments { get; set; }
        public List<VideoInfo> Videos { get; set; }
        public List<Photo> Photos { get; set; }
        public DateTime JoinDate { get; set; }
        private ClassifiedAds _ClassifiedAds;
        public ClassifiedAds ClassifiedAds
        {
            get
            {
                if (_ClassifiedAds == null)
                    _ClassifiedAds = new ClassifiedAds();
                return _ClassifiedAds;
            }
            set
            {
                _ClassifiedAds = value;
            }
        }
        private RestaurantInfo _RestaurantInfo;
        public RestaurantInfo RestaurantInfo 
        {
            get
            {
                if (_RestaurantInfo==null)
                {
                    _RestaurantInfo = new RestaurantInfo();
                }
                return _RestaurantInfo;
            }
            set
            {
                _RestaurantInfo = value;
            }
        }
    }

    public class Photo
    {
        public string Title { get; set; }
        public string ImageExtention { get; set; }
        public string AttachmentLinks { get; set; }
    }

    public class Comment
    {
        public DateTime DateTime { get; set; }
        public long DateNumberic { get; set; }
        public string UserName { get; set; }
        public string CommentContent { get; set; }
        public List<string> AttachmentLinks { get; set; }
    }

    public class RestaurantInfo
    {
        private ContactInfo _ContactInfo;
        public ContactInfo ContactInfo
        {
            get
            {
                if (_ContactInfo == null)
                    _ContactInfo = new ContactInfo();
                return _ContactInfo;

            }
            set { _ContactInfo = value; }
        }
        public double Rate { get; set; }
        public List<string> Menus { get; set; }
        public DateTime OpenTime { get; set; }
        public DateTime CloseTime { get; set; }
        public decimal MinPrice { get; set; }
        public decimal MaxPrice { get; set; }
    }

    public class ClassifiedAds
    {
        public string NewId { get; set; }
        public string Title { get; set; }
        public string Content { get; set; }
        private ContactInfo _ContactInfo;
        public ContactInfo ContactInfo
        {
            get
            {
                if (_ContactInfo == null)
                    _ContactInfo = new ContactInfo();
                return _ContactInfo;

            }
            set { _ContactInfo = value; }
        }
        public DateTime DateTime { get; set; }
        public List<string> AttachmentLinks { get; set; }
    }

    public class Friend
    {
        public string ScreenName { get; set; }
        public string AccountLink { get; set; }
        public int NumberFriend { get; set; }
    }

    public class Note
    {
        public string Name { get; set; }
        public DateTime DateTimeCreated { get; set; }
        public string Content { get; set; }
    }

    public class Groups
    {
        public string Name { get; set; }
        public string LinkDetail { get; set; }
    }

    public class Profile
    {
        private Work _Work;
        public Work Work
        {
            get
            {
                if (_Work == null)
                    _Work = new Work();
                return _Work;
            }
            set { _Work = value; }
        }
        private Education _Education;
        public Education Education
        {
            get
            {
                if (_Education == null)
                    _Education = new Education();
                return _Education;
            }
            set { _Education = value; }
        }
        private Place _Place;
        public Place Place
        {
            get
            {
                if (_Place == null)
                    _Place = new Place();
                return _Place;
            }
            set { _Place = value; }
        }
        private ContactInfo _ContactInfo;
        public ContactInfo ContactInfo
        {
            get
            {
                if (_ContactInfo == null)
                    _ContactInfo = new ContactInfo();
                return _ContactInfo;

            }
            set { _ContactInfo = value; }
        }
        private Relationship _Relationship;
        public Relationship Relationship
        {
            get
            {
                if (_Relationship == null)
                    _Relationship = new Relationship();
                return _Relationship;
            }
            set { _Relationship = value; }
        }
    }

    public class Work
    {
        public string Company { get; set; }
        public string Position { get; set; }
        public string City { get; set; }
        public string Description { get; set; }
        public string TimePeriod { get; set; }
        public string ProfessionalSkills { get; set; }
    }

    public class Education
    {
        public string School { get; set; }
        public string TimePeriod { get; set; }
        public bool Graduated { get; set; }
        public string Description { get; set; }
        public string Concentrations { get; set; }
        public bool Level { get; set; }
    }

    public class Place
    {
        public string HomeTown { get; set; }
        public string CurrentCity { get; set; }
    }

    public class ContactInfo
    {
        public string Email { get; set; }
        public string Facebook { get; set; }
        public string MobilePhone { get; set; }
        public string HomePhone { get; set; }
        public string Address { get; set; }
        public string ScreenName { get; set; }
        public string Website { get; set; }
        public string BirthDay { get; set; }
        public string Gender { get; set; }
        public string Language { get; set; }
        public string InterestedIn { get; set; }
    }

    public class Relationship
    {
        public string FamilyMember { get; set; }
        public string ShortDescription { get; set; }
    }
}
